Image resolution is ever increasing and so are the accompanying frame rates. All in all this results in increasing demands to system bandwidths, transporting media bandwidth as well as storage capacity of both temporary storage (e.g. RAM) and permanent storage (e.g. HDD (Hard Disc Drive)). The strains on all these function blocks will be reduced if image data is compressed. Historically memory and permanent storage media bandwidths have not been increasing as rapidly as data processing means, which indicates that using on-the-fly image compression will yield much higher system performance than just adopting technological improvements in memory and permanent storage bandwidths. The higher performance can also be traded in for lower system costs, as less memory and permanent storage is required. Along with this, lower performance memory and storage means can be used. Another benefit, particular in portable products, is the ability to reduce power consumption as the power needed for the image compression can be much less than that required by additional memory and additional permanent storage.
Prior solutions based on industry standards like JPEG (Joint Photographic Experts Group), require a lot of silicon to be implemented in hardware and are often too slow when implemented in software—this is particular the case if the bit-depth of pixels increase from the traditional 8 bits per color to e.g. 16 bits per color. Today the higher bit-depths are a natural thing in high-end digital imaging. This improves the color fidelity and enables more advanced image processing to be applied in order to obtain more satisfactory results than previously accepted. If JPEG or similar compression algorithms are used, the RAW image data must be fully calibrated, interpolated, and enhanced prior to the compression itself, this is outlined in the block diagram of FIG. 1. This increases the complexity and cost of the system and reduces the ability to generate high-quality images, as a lot of image enhancement is required for optimum results, sometimes in combination with user interaction. Vast amounts of processing resources are normally not present in portable devices like digital cameras. Accordingly, improvements are needed in the processing of image data.
EP 1 173 005 describes a method for compressing raw color image data by mapping different color planes into square sections and compressing these independently. The decompressed file must then be re-mapped to restore the original pattern of the color image data.
U.S. Pat. No. 6,614,483 describes a method for providing a simple lossy image compression. The method compresses image data in a lossy manner by dividing down pixel values by a loss factor and thereby creating an evenly distributed linear loss in the pool of image data. From an image-quality point of view, it is a disadvantage that this approach will increase the amount of digital noise in the darker areas of the resulting decompressed image as presented on either paper or a computer monitor. The reason being that image processing for preparing data for a more appropriate appearance requires multiplying image data with a gamma function.
In U.S. Pat. No. 6,614,483, the described algorithm also needs data to be handled by a color extraction unit prior to the actual compression. This color extraction unit performs a very simple pixel interpolation to generate red, green, and blue values for each pixel. This instantly reduces the possibility of generating a high quality image at a later stage.
The variable length (VL) encoding described in U.S. Pat. No. 6,614,483 is based on a combination of 1's complement VL encoding with leading “zero” and “one” detection. This form of encoding works well with image data with low color bit-depth (e.g. 8 bits), but often yields poor results when used with image data with high color bit-depth (e.g. 16 bits) and a relatively high amount of entropy, which are all characteristics for high-quality imaging.
Another limitation of the implementation described in U.S. Pat. No. 6,614,483 is that it requires an external or internal buffer to hold at least two adjacent lines of image data to be able to do simple color interpolation. With high resolution image sensors, the required amount of temporary storage can be quite high and thereby increase system cost if the buffer is implemented together with the block that carries out the compression itself. Using cheaper external storage (e.g. Dynamic RAM, DRAM) will often be unacceptable from a performance point of view.